import instance from "@/util/axios.js"
/**
 * 获取评论
 * @param {number} page 页码
 * @param {number} limit 每页多少条
 * @param {number} roomNoId 房间id
 */ 
export const getEvaluate = async ({
        page,
        limit,
        roomNoId
    }) =>
    await instance.get("/api/currency/getEvaluate", {
        params: {
            page,
            limit,
            roomNoId
        }
    })

/**
 * 发布评论
 * @param {number} fraction 评分
 * @param {string} comment 评语
 * @param {number} roomNoId 房间id
 */
export const evaluate = async ({fraction,comment,roomNoId}) =>
await instance.post("/api/admin/evaluate",{fraction,comment,roomNoId})